package Runde4;

public class MyQueueElement {
	final private Node node;
	private MyQueueElement next;
	
	/**
	 * @precondition - element!=null;
	 * @postcondition - Create's a new MyQueueElement containing given node
	 * @param node - note which MyQueueElement contains
	 */
	public MyQueueElement (Node node) {
		this.node = node;
	}
	
	/**
	 * @postcondition - Set's this MyQueueElements successor
	 * @param next - next MyQueueElement
	 */
	public void setNextElement(MyQueueElement next) {
		this.next = next;
	}
	
	/**
	 * @postcondition - Returns this MyQueueElements successor
	 */
	public MyQueueElement getNextElement() {
		return next;
	}
	
	/**
	 * @postcondition - Returns this MyQueueElements content (the contained node)
	 */
	public Node getElementContent() {
		return node;
	}
}
